package com.iwhalecloud.bss.kite.cucc.service.job.scene;

import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.Callable;

import com.iwhalecloud.bss.kite.common.executor.enums.ExecutorTypeEmun;
import com.iwhalecloud.bss.kite.cucc.client.api.scene.IInstLoader;
import com.iwhalecloud.bss.kite.cucc.client.dto.pos.KitePosDTO;
import com.ztesoft.bss.common.bo.LoginInfo;
import com.ztesoft.bss.common.util.ContextUtil;
public class InstReloadTask implements Callable<Map<String, Object>> {
    
    private String sessionId;
    
    private LoginInfo loginInfo;

    private KitePosDTO kitePosDTO;
    
    private IInstLoader loader;
    
    private String sceneInstId;
    private String operType;
    private String custId;
    private String staffId;

    public InstReloadTask(String sceneInstId, String operType, String custId, String staffId, IInstLoader loader, KitePosDTO kitePosDTO, String sessionId, LoginInfo loginInfo) {
        this.sceneInstId = sceneInstId;
        this.operType = operType;
        this.custId = custId;
        this.staffId = staffId;
        this.loader = loader;
        this.kitePosDTO = kitePosDTO;
        this.sessionId = sessionId;
        this.loginInfo = loginInfo;
    }

    @Override
    public Map<String, Object> call() throws Exception {
        ContextUtil.setLoginInfo(loginInfo);
        this.loader.loadInst(this.sceneInstId, this.operType, this.custId, this.staffId, this.kitePosDTO, this.loginInfo);
        return new HashMap<String, Object>();
    }

}
